import Storage from "@/libs/Storage";

const splashVersion = 2
export default {
  async autoShow(args) {
    // console.log('splash args', args, await Storage.get('splash'))
    if (await Storage.get('splash') !== splashVersion) {
      this.done()
      uni.redirectTo({
        url: '/pages/splash/splash'
      })
      return true
    }
  },
  done() {
    Storage.set('splash', splashVersion)
  },
  clear() {
    Storage.del('splash')
  }
}
